<?php
/**
 * Medical Study Object
 * Load from the Dao and return the Object corresponding to msid passed id
 * if nothing is found it will redirect to the home page with an error
 *
 * @author Xavier VILAIN
 * @package \Nawa\MedicalStudy
 *
 */

use Nawa\MedicalStudy;
$xview = Xview::instance();
$id = $xview->val('msid');
if(empty($id))
{
	$xview->accessDenied();
}
try {
	return \Fox\Dao::load(MedicalStudy::className(),$id);
}
catch (Fox\Object\Exception\NotExist $e)
{
	$xview->accessDenied();
}